my.zulip: add message permalink
This commit is contained in:
parent
a39b5605ae
commit
673ee53a49
1 changed files with 9 additions and 0 deletions
|
@ -66,6 +66,15 @@ class Message:
|
||||||
server: Server
|
server: Server
|
||||||
content: str
|
content: str
|
||||||
|
|
||||||
|
@property
|
||||||
|
def permalink(self) -> str:
|
||||||
|
# seems that these link to the same message
|
||||||
|
# https://memex.zulipchat.com/#narrow/stream/284580-python/topic/py-spy.20profiler/near/234798881
|
||||||
|
# https://memex.zulipchat.com/#narrow/stream/284580/near/234798881
|
||||||
|
# https://memex.zulipchat.com/#narrow/near/234798881
|
||||||
|
# however not sure how to correlate stream id and message/topic for now, so preferring the latter version
|
||||||
|
return f'https://{self.server.string_id}.zulipchat.com/#narrow/near/{self.id}'
|
||||||
|
|
||||||
|
|
||||||
from typing import Union
|
from typing import Union
|
||||||
from itertools import count
|
from itertools import count
|
||||||
|
|
Loading…
Add table
Reference in a new issue